<template>
 <div id="page-dialogs">
    <v-container grid-list-xl fluid>
      <v-layout row wrap>
        <v-flex lg4>
            <div slot="widget-content">
              <v-dialog v-model="dialogBranch" persistent max-width="900px">
                <v-card>
                  <v-card-title>
                     <v-flex xs9>
                      <span class="headline">添加分店</span>
                     </v-flex>
                     <v-fiex xs1>
                      <v-btn color="blue darken-1" flat >保存</v-btn>
                     </v-fiex>
                     <v-fiex xs1>
                      <v-btn color="blue darken-1" flat @click="close">取消</v-btn>
                     </v-fiex>
                  </v-card-title>
                  <v-divider></v-divider>
                    <v-container grid-list-md>
                      <v-layout wrap>
                        <v-flex xs12 sm6 md6>
                          <v-text-field label="分店名称" required></v-text-field>
                        </v-flex>
                        <v-flex xs12 sm6 md6>
                          <v-text-field label="分店负责人" hint=""></v-text-field>
                        </v-flex>
                        <v-flex xs12 sm6 md6>
                          <v-text-field
                            label="手机号"
                            hint="分店负责人手机号"
                            persistent-hint
                            required
                          ></v-text-field>
                        </v-flex>
                        <v-flex xs12 sm6 md6>
                          <v-text-field
                            label="分店电话"
                            hint="分店电话号"
                            persistent-hint
                            required
                          ></v-text-field>
                        </v-flex>
                        <v-flex xs4 v-if="scopeOfApplication != 1">
                          <v-select
                            v-model="province"
                            label="省"
                            item-text="country"
                            item-value="abbr"
                            single-line
                          ></v-select>
                        </v-flex>
                        <v-flex xs4 v-if="scopeOfApplication != 1">
                          <v-select
                            v-model="city"
                            label="市"
                            item-text="country"
                            item-value="abbr"
                            single-line
                          ></v-select>
                        </v-flex>
                        <v-flex xs4 v-if="scopeOfApplication != 1">
                          <v-select
                            v-model=" district"
                            label="区"
                            item-text="country"
                            item-value="abbr"
                            single-line
                          ></v-select>
                        </v-flex>
                        <v-flex xs12 v-if="scopeOfApplication != 1">
                         <v-text-field
                            label="地址"
                            hint="分店详细地址"
                            persistent-hint
                            required
                          ></v-text-field>
                        </v-flex>                
                      </v-layout>
                      <v-divider class="divider"></v-divider>
                    </v-container>
                  <v-card-actions>
                    
                  </v-card-actions>
                </v-card>
              </v-dialog>
            </div>
        </v-flex>
      </v-layout>
    </v-container>
  </div>
</template>

<script>
import Pubsub from "pubsub-js";
export default {
    props: ["dialogBranch"],
    data () {
        return {
            city:[],
            province:[],
            scopeOfApplication:"1",
            district:[],
            address:""
        }
    },
    components: {

    },
    methods: {
        close(){
        //发布消息
        Pubsub.publish("cancelBranch")
        }
    }
}
</script>

<style>
.divider {
  margin:16px;
}
 
</style>
